/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.business;


import br.com.dao.DaoFactory;
import br.com.dao.util.GenericDao;
import br.com.model.TipoMidia;
import br.com.dao.TipoMidiaDao;
import java.util.LinkedList;


public class TipoMidiaBO {

    public void insereTipoMidia(TipoMidia tipoMidia) {
        GenericDao<TipoMidia> tipoMidiaDao = DaoFactory.getDaoFactory().getTipoMidiaDao();
        tipoMidiaDao.save(tipoMidia);
    }

    public LinkedList<TipoMidia> listarTipoMidia() {
        GenericDao<TipoMidia> tipoMidiaDao = DaoFactory.getDaoFactory().getTipoMidiaDao();
        return tipoMidiaDao.listar();
    }

     public TipoMidia getTipoMidiaById(Integer id) {
      GenericDao<TipoMidia> tipoMidiaDao = DaoFactory.getDaoFactory().getTipoMidiaDao();
      return tipoMidiaDao.getObjectById(id);
    }
}
